package com.shucoin.www.tycoin.ui.home.me;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.shucoin.www.tycoin.BaseFragment;
import com.shucoin.www.tycoin.R;
import com.shucoin.www.tycoin.ui.login.LoginAt;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;

/**
 * Created by happy on 2017/8/26.
 */

public class AboutMeFt extends BaseFragment implements View.OnClickListener {
    Unbinder unbinder;
    @BindView(R.id.text_login)
    TextView textLogin;
    @BindView(R.id.text_login_out)
    TextView textLoginOut;


    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View rootView = inflater.inflate(R.layout.layout_fragment_about, null);
        unbinder = ButterKnife.bind(this, rootView);
        initView();
        return rootView;
    }

    private void initView(){
        textLogin.setOnClickListener(this);
        textLoginOut.setOnClickListener(this);
    }


    @Override
    public void onDestroyView() {
        super.onDestroyView();
        unbinder.unbind();
    }

    @Override
    public void onClick(View v) {
        switch (v.getId())
        {
            case R.id.text_login:
                startActivity(new Intent(getActivity(), LoginAt.class));
                break;
            case R.id.text_login_out:
                getActivity().finish();

                break;
        }
    }

}
